package com.itheima_01;

import java.util.ArrayList;
import java.util.List;

public class ListDemo02 {
    public static void main(String[] args) {
        //创建集合对象
        List<String> list = new ArrayList<String>();

        //添加元素
        list.add("hello");
        list.add("world");
        list.add("java");

//        list.add(1,"javaee");
//        System.out.println(list.remove(1));
//        System.out.println(list.set(1,"javaee"));
        System.out.println(list.get(1));


        //输出集合对象
        System.out.println(list);
    }
}
